<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'shop.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	
	
	 <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    
    
	
    <link href='https://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,700,600' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Raleway:400,100' rel='stylesheet' type='text/css'>
    
    <!-- Bootstrap -->
    <link rel="stylesheet" href="PAGE/css/bootstrap.min.css">
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="PAGE/css/font-awesome.min.css">
    
    <!-- Custom CSS -->
    <link rel="stylesheet" href="PAGE/css/owl.carousel.css">
    <link rel="stylesheet" href="PAGE/style.css">
    <link rel="stylesheet" href="PAGE/css/responsive.css">
  </head>
  
  <body>
   <div class="header-area">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <div class="user-menu">
                        <ul>
                               <li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user"></i> 我的账户</a></li>
                          <!--   <li><a href="#"><i class="fa fa-heart"></i>心愿单</a></li> -->
                            <li><a href="AddCartServlet?id=0"><i class="fa fa-user"></i>购物车</a></li>
                            <li><a href="OrderServlet?type=0"><i class="fa fa-user"></i> 订单信息</a></li>
                            
                            
                            <c:choose>
                            	<c:when test="${sessionScope.user.usersNickname eq null}">
                            	<li><a href="UserAndOrder/login.jsp"><i class="fa fa-user">用户登录</i>
                            	
                            	</c:when>
                            	<c:otherwise>
                            	<li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user">${sessionScope.user.usersNickname}</i>
                            	
                            	</c:otherwise>
                            </c:choose>
                            
                             </a></li>
                        </ul>
                    </div>
                </div>
                
                <div class="col-md-4">
                    <div class="header-right">
                        <ul class="list-unstyled list-inline">
                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">货币 :</span><span class="value">人民币 </span><b class="caret"></b></a>

                            </li>

                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">语言:</span><span class="value">简体中文</span><b class="caret"></b></a>
                                <ul class="dropdown-menu">

                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div> <!-- End header area -->
    
  
                    <div class="logo">
                        <div style="text-align: center;">
                            <form action="UserSearchServlet" method="post">
                            	<a href="PAGE/InterFace.jsp"><img src="PAGE/img/logo.png"   ></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			
                      			 <font style="font-style:微软雅黑;" size="5" color="#0C89CF">搜 索 商 品    </font>
                       			 <input type="text" name="usersearch" placeholder="请输入搜索内容">
                                <input type="submit" value="搜索">
                            </form>  
                        </div>
                    </div>
                    
<!-- End site branding area -->
    
    <div class="mainmenu-area">
        <div class="container">
            <div class="row">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div> 
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li ><a href="/eshop/PAGE/InterFace.jsp"">主页</a></li>
                        <li class="active"><a href="UserSearchServlet">商品页面</a></li>
                        <li><a href="ProductDetailsServlet?id=0">商品详情</a></li>
                        <li><a href="AddCartServlet?id=0">购物车</a></li>
                        <li><a href="OrderServlet?type=0">您的宝贝</a></li>
                         <li><a href="EvaluateServlet?type=showEvaluate">留言板</a></li>
                        <%--<li><a href="#">Category</a></li>
                        <li><a href="#">Others</a></li>
                        <li><a href="#">Contact</a></li>
                    --%></ul>
                </div>  
            </div>
        </div>
    </div> <!-- End mainmenu area -->
    
    <div class="product-big-title-area">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="product-bit-title text-center">
                        <h2>Shop</h2>
                    </div>
                </div>
            </div>
        </div>
    </div>
    

    
    
    <div class="single-product-area">
        <div class="zigzag-bottom"></div>
        <div class="container">
	  

	 		
	 			
	 			 	<c:forEach items="${requestScope.goodslist}" var="evergoods">
	 				
	 					
			                <div class="col-md-3 col-sm-6">
			                    <div class="single-shop-product">
				                        <div class="product-upper">
				                            <img src="${evergoods.goodsImg }" alt="" style="height: 100px">
				                        </div>
				                        
				                        	<h2><a href="ProductDetailsServlet?id=${evergoods.goodsId}">${evergoods.goodsName}</a></h2>
				                        <div class="product-carousel-price">
				                            <ins>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${evergoods.goodsPrice }</ins>
				                        </div>                       
				                        <div class="product-option-shop">
				                            <a class="add_to_cart_button" data-quantity="1" data-product_sku="" data-product_id="70" rel="nofollow" href="AddCartServlet?id=${evergoods.goodsId}">添加至购物车</a>
				                        </div>                       
			                    </div>
			                </div>
			           
	 				
	 			 </c:forEach>
	 			
	 		
		            <div class="row">
		                <div class="col-md-12">
		                    <div class="product-pagination text-center">
		                        <nav>
		                          
                                  <ul class="pagination" style="margin: 0px">
				 	
	                            <li>
	                              <a href="UserSearchServlet?pn=${p.pn-1}" aria-label="Previous">
	                                <span aria-hidden="true">&laquo;</span>
	                              </a>
	                            </li>
	                            <li><a href="UserSearchServlet?pn=1">1</a></li>
	                            <li><a href="UserSearchServlet?pn=2">2</a></li>
	                            <li><a href="UserSearchServlet?pn=3">3</a></li>
	                            <li><a href="UserSearchServlet?pn=4">4</a></li>
	                            <li><a href="UserSearchServlet?pn=5">5</a></li>
	                            <li>
	                              <a href="UserSearchServlet?pn=${p.pn+1}" aria-label="Next">
	                                <span aria-hidden="true">&raquo;</span>
	                              </a>
	                            </li>
	                          </ul>
		                            	<div style="margin:4px;padding:0px" id="bt">
										当前第${p.pn}页，总共${p.pages}页			
										</div>
												                
		                         
		                        </nav>                        
		                    </div>
		                </div>
		            </div>
        </div>
    </div>


   

   
    <!-- Latest jQuery form server -->
    <script src="https://code.jquery.com/jquery.min.js"></script>
    
    <!-- Bootstrap JS form CDN -->
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    
    <!-- jQuery sticky menu -->
    <script src="PAGE/js/owl.carousel.min.js"></script>
    <script src="PAGE/js/jquery.sticky.js"></script>
    
    <!-- jQuery easing -->
    <script src="PAGE/js/jquery.easing.1.3.min.js"></script>
    
    <!-- Main Script -->
    <script src="PAGE/js/main.js"></script>
  </body>
</html>
